from fastapi import APIRouter
from app.db.postgres import ping_postgres
from app.db.mongo import ping_mongo


router = APIRouter(tags=["health"])


@router.get("/health")
async def health():
    pg_ok = await ping_postgres()
    mongo_ok = await ping_mongo()
    return {"postgres": pg_ok, "mongo": mongo_ok}